package com.lean.android.projecttemplate.ui.main

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.runtime.CompositionLocalProvider
import androidx.navigation.NavHostController
import androidx.navigation.compose.rememberNavController
import com.lean.android.localprovider.LocalActivity
import com.lean.android.projecttemplate.ui.theme.ProjectTemplateTheme
import org.koin.compose.KoinContext

class MainActivity : ComponentActivity() {


    private lateinit var navController: NavHostController

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        enableEdgeToEdge()
        setContent {
            CompositionLocalProvider(
                LocalActivity provides this
            ) {
                KoinContext {
                    ProjectTemplateTheme {
                        navController = rememberNavController()
                        App(navController)
                    }
                }
            }
        }
    }
}
